<!-- register 页面内容 -->
<section class="register col-xs-12" ng-controller="registerCtrl">

    <div class="container">
        <div class="row register-head hidden-xs">
            时间自由，轻松挣钱
        </div>
        <div class="row register-summary hidden-xs">
            享受自由工作， 随时随地地赚取更多收入，稳定可靠
        </div>
        <div class="row register-content">
          <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12 padding-reset swiper-btns" ng-if="!fromEmail">
            <ul>
              <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="register">
                用户注册
              </li>
              <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="service">
                服务商加盟
              </li>
              <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="brand">
                品牌商加盟
              </li>
            </ul>
            <div class="swiper-block hide">
            </div>
          </div>
            <div class="col-md-8 col-sm-8 col-xs-12 register-form yf-shadow">
                <form name="registerform" role="form" autocomplete="false" novalidate ng-submit="register(registerform.$invalid, user);">
                    <div class="form-group send-code-input">
                        <a href="javascript:void(0);" class="btn btn-default send-code-btn pull-right" ng-click="sendCode(user.tel);" ng-disabled="isDisplayTime" ng-bind="isDisplayTime ? count_down_time + '秒后发送': '发送验证码'"></a>
                        <input type="tel" ng-model="user.tel" name='tel' class="form-control" ng-pattern="/^1[34578]\d{9}$/" placeholder="手机号" autocomplete="false" required>
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.tel.$error.pattern || registerform.tel.$error.required)">
                        请输入有效手机号！
                    </div>

                    <div class="form-group">
                        <input type="tel" ng-model="user.code" name='code' ng-pattern="/\d{6}/i" class="form-control" placeholder="验证码" autocomplete="false" required>
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.code.$error.pattern || registerform.code.$error.required)">
                        请正确输入验证码
                    </div>

                    <div class="form-group">
                        <input type="email" ng-model="user.email" name='email' class="form-control" ng-pattern="/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/" placeholder="邮箱">
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.email.$error.pattern)">
                        请正确输入邮箱！
                    </div>
                    <div class="form-group">
                        <input type="text" ng-model="user.real_name" name='real_name' class="form-control" ng-pattern="/^[A-Za-z0-9\u4e00-\u9fa5]{2,20}$/" placeholder="姓名" autocomplete="false" required>
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.real_name.$error.pattern || registerform.real_name.$error.required)">
                        请输入长度 2-20位的名字(中文，字母，数字组成)！
                    </div>
                    <div class="form-group">
                        <input type="password" ng-model="user.password" name='password' class="form-control" ng-pattern="/^\S{6,20}$/" placeholder="密码" autocomplete="false" required>
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.password.$error.pattern || registerform.password.$error.required)">
                        请输入 6-20 位的有效密码！
                    </div>
                    <div class="form-group">
                        <input type="password" ng-model="user.confirmpassword" name='confirmpassword' class="form-control" compare-to='user.password' placeholder="确认密码" autocomplete="false" required>
                    </div>
                    <div class="form-group error-container" ng-show="isregister && (registerform.confirmpassword.$error.compareTo || registerform.confirmpassword.$error.required)">
                        二次密码输入不一致
                    </div>

                    <div class="form-group">
                        <label class="checkbox-inline">
                          <input type="checkbox" id="checkbox" value="true" ng-click="isargee = !isargee" required>
                          <a ui-sref="agreement">同意用户协议</a>
                        </label>
                    </div>

                    <div class="form-group error-container" ng-show="isregister && isargee">
                        请确定同意协议
                    </div>

                    <button type="submit" class="pull-right btn btn-mt-register">
                    立即注册
                    <span class="icon-right"></span>
                </button>
                </form>
            </div>

            <div class="col-md-4 col-sm-4 col-xs-12 register-tip yf-shadow">
                <span>用户须知</span>
                <p>
                    欢迎注册窗管家，为保证您的利益请填写您的真实信息
                    <br>
                    <span>
                      企业用户注册请通过企业管理员所发送的邀请邮件注册
                    </span>
                </p>
                <a class="btn btn-default" ui-sref="login">
                已有账号？去登录
              </a>
            </div>
        </div>
    </div>
</section>
